<?php
/**
 * Created by PhpStorm.
 * User: Allen
 * Date: 2016/10/9
 * Time: 17:31
 */
class AcceptRecord extends TestCase
{

    protected $_repoService;
    protected $_user;

    public function testStore() {
        $this->actingAs($this->_user);
        $data = [
            'customer_id' => '58043e77051a430c48004c61',
        ];
        $response = $this->call('POST','/v1/acceptRecords', $data);
        dump($response->content());
    }

    public function testUpdate() {
        $this->actingAs($this->_user);
        $data = [
            'user' => [
                'from' => '583d36b128ac5125b01658c6',
                'to' => '583d376d28ac51b4b346689d',
                'type' => 'mv'
            ],
            'customer_id' => "583d392d051a4317d4003831",
        ];
        $response = $this->call('PUT','/v1/acceptRecords/58043fe0e6e5cf7165b7d285', $data);
        dump($response->content());
    }

    protected function setUp()
    {
        parent::setUp();
        //$this->_repoService = new \App\Services\Repo\CustomerRepo();

        //$this->_user = \App\Models\User::where('name', 'ken')->first();

        $this->_user = \App\Models\User::where('name', 'allen')->first();
    }

    protected function tearDown()
    {
        parent::tearDown();
    }
}
